import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

export default defineConfig(({ command }) => ({
  base: "/sub-vue/",
  // base: command === "build" ? "/sub-vue/" : "/",
  plugins: [vue()],
  server: {
    port: 5175,
    cors: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  },
  preview: { port: 5175 },
}));
